#pragma once

#include <iostream>
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include "zlib.h"

#if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(__CYGWIN__)
#  include <fcntl.h>
#  include <io.h>
#  define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY)
#else
#  define SET_BINARY_MODE(file)
#endif

#define CHUNK 16384

int compress(const char *in, const char *out, bool flag);
int uncompress(const char *infile, const char *outfile);
int def_zpipe(const void* p_source, const void* p_dest, int level, bool flag);
int inf_zpipe(FILE *source, FILE *dest);
void zerr(int ret);

